$this->filterMatchType = $callbackReturn;
}
}
+
/**
* Handle coming across a <!DOCTYPE declaration.
*
$callbackReturn = false;
}
- if ( $checkIfSafe && isset( $parsedDTD['internal'] ) ) {
- if ( !$this->checkDTDIsSafe( $parsedDTD['internal'] ) ) {
- $this->wellFormed = false;
- }
+ if ( $checkIfSafe && isset( $parsedDTD['internal'] ) &&
+ !$this->checkDTDIsSafe( $parsedDTD['internal'] )
+ ) {
+ $this->wellFormed = false;
}
}
* We whitelist an extremely restricted subset of DTD features.
*
* Safe is defined as:
- * * Only contains entity defintions (e.g. No <!ATLIST )
+ * * Only contains entity definitions (e.g. No <!ATLIST )
* * Entity definitions are not "system" entities
* * Entity definitions are not "parameter" (i.e. %) entities
* * Entity definitions do not reference other entites except &